home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Source / MacTech® Magazine / Volume 09 - 1993 / 09.02 Feb 93 / Jörg's Folder / QuickDraw.4th.inc < prev    next >
Encoding:
Text File  |  1992-10-26  |  4.6 KB  |  245 lines  |  [TEXT/NISI]

  1. ( QuickDraw Equates and record definitions )
  2.  
  3. push.VOCAB.state
  4. ONLY DEVELOPMENT
  5. ALSO FORTH
  6. ALSO MAC DEFINITIONS
  7.  
  8. #ifndef    _Quickdraw_
  9.     #ifdef _MODULES_
  10.         5000 Insert.MODULE _QuickDraw_
  11.     #else
  12.         #define _Quickdraw_
  13.     #endif
  14.     
  15.     #ifndef    _MacTypes_
  16.         #include "MacTypes.h"
  17.     #endif
  18.  
  19. pointer    CONSTANT QDPtr
  20. Handle    CONSTANT QDHandle
  21. Handle    CONSTANT RgnHandle
  22. pointer    CONSTANT RgnPtr
  23. pointer    CONSTANT QDProcsPtr
  24.  
  25. 8        CONSTANT Pattern
  26. 32        CONSTANT Bits16[16]
  27.  
  28. ( transfer modes )
  29. 0    CONSTANT srcCopy
  30. 1    CONSTANT srcOr
  31. 2    CONSTANT srcXor
  32. 3    CONSTANT srcBic
  33. 4    CONSTANT notSrcCopy
  34. 5    CONSTANT notSrcOr
  35. 6    CONSTANT notSrcXor
  36. 7    CONSTANT notSrcBic
  37. 8    CONSTANT patCopy
  38. 9    CONSTANT patOr
  39. 10    CONSTANT patXor
  40. 11    CONSTANT patBic
  41. 12    CONSTANT notPatCopy
  42. 13    CONSTANT notPatOr
  43. 14    CONSTANT notPatXor
  44. 15    CONSTANT notPatBic
  45.  
  46. ( Standard colors )
  47. 33    CONSTANT blackColor
  48. 30    CONSTANT whiteColor
  49. 205    CONSTANT redColor
  50. 341    CONSTANT greenColor
  51. 409    CONSTANT blueColor
  52. 273    CONSTANT cyanColor
  53. 137    CONSTANT magentaColor
  54. 69    CONSTANT yellowColor
  55.  
  56. ( standard picture comments )
  57. 0    CONSTANT picLParen
  58. 1    CONSTANT picRParen
  59.  
  60. ( color mapping )
  61. 0    CONSTANT normalBit
  62. 1    CONSTANT inverseBit
  63. 2    CONSTANT blueBit
  64. 3    CONSTANT greenBit
  65. 4    CONSTANT redBit
  66. 5    CONSTANT blackBit
  67. 6    CONSTANT yellowBit
  68. 7    CONSTANT magentaBit
  69. 8    CONSTANT cyanBit
  70.  
  71. ( Style constants )
  72. 1    CONSTANT bold
  73. 2    CONSTANT italic
  74. 4    CONSTANT underline
  75. 8    CONSTANT outline 
  76. 16    CONSTANT shadow
  77. 32    CONSTANT condense
  78. 64    CONSTANT extend
  79.  
  80. ( GrafVerb constants )
  81. 0    CONSTANT frame
  82. 1    CONSTANT paint
  83. 2    CONSTANT erase
  84. 3    CONSTANT invert
  85. 4    CONSTANT GVfill
  86.  
  87. :RECORD Point
  88.     vert        short
  89.     horiz        short
  90. ;RECORD
  91.  
  92. :RECORD Cursor
  93.     data    Bits16[16]
  94.     mask    Bits16[16]
  95.     hotSpot    SizeOf( Point )
  96. ;RECORD
  97.     
  98. :RECORD Rect
  99.     topleft        0
  100.     top            short
  101.     left        short
  102.     botright    0
  103.     bottom        short
  104.     right        short
  105. ;RECORD
  106.  
  107. :RECORD    FontInfo
  108.     ascent    short
  109.     descent    short
  110.     widMax    short
  111.     leading    short
  112. ;RECORD
  113.  
  114. :RECORD BitMap
  115.     baseAddr        QDPtr
  116.     rowBytes        short
  117.     bitmap.bounds    0
  118.     bounds.top        short
  119.     bounds.left        short
  120.     bounds.bottom    short
  121.     bounds.right    short
  122. ;RECORD
  123.  
  124. :RECORD    PenState
  125.     pnLoc    SizeOf( Point )
  126.     pnSize    SizeOf( Point )
  127.     pnMode    short
  128.     pnPat    Pattern
  129. ;RECORD
  130.  
  131. :RECORD    Polygon
  132.     polySize    short
  133.     polyBBox    SizeOf( Rect )
  134.     polyPoints    0
  135. ;RECORD
  136.  
  137. :RECORD    Region
  138.     rgnSize        short
  139.     rgnBBox        SizeOf( Rect )
  140.     rgnData        0
  141. ;RECORD
  142.  
  143. :RECORD    Picture
  144.     picSize        short
  145.     picFrame    SizeOf( Rect )
  146.     picData        0
  147. ;RECORD
  148.  
  149. :RECORD QDProcs
  150.     textProc        QDPtr
  151.     lineProc        QDPtr
  152.     rectProc        QDPtr
  153.     rRectProc        QDPtr
  154.     ovalProc        QDPtr
  155.     arcProc            QDPtr
  156.     polyProc        QDPtr
  157.     rgnProc            QDPtr
  158.     bitsProc        QDPtr
  159.     commentProc        QDPtr
  160.     txMeasProc        QDPtr
  161.     getPicProc        QDPtr
  162.     putPicProc        QDPtr
  163. ;RECORD
  164.  
  165. :RECORD    GrafPort
  166.     device                    short
  167.     portBits                0
  168.     portBits.Bits            pointer
  169.     portBits.rowBytes        short
  170.     portBits.bounds            0
  171.     portBits.bounds.top        short
  172.     portBits.bounds.left    short
  173.     portBits.bounds.bottom    short
  174.     portBits.bounds.right    short
  175.     portRect                0
  176.     portRect.top            short
  177.     portRect.left            short
  178.     portRect.bottom            short
  179.     portRect.right            short
  180.     visRgn        rgnHandle
  181.     clipRgn        rgnHandle
  182.     bkPat        Pattern
  183.     fillPat        Pattern
  184.     pnState        SizeOf( PenState )
  185.     pnVis        short
  186.     txFont        short
  187.     txFace        short
  188.     txMode        short
  189.     txSize        short
  190.     spExtra        long
  191.     fgColor        long
  192.     bkColor        long
  193.     colrBit        short
  194.     patStretch    short
  195.     picSave        QDHandle
  196.     rgnSave        QDHandle
  197.     polySave    QDHandle
  198.     grafProcs    QDProcsPtr
  199. ;RECORD
  200.  
  201. :RECORD    GrafGlobals
  202.     ( the following are "private" variables, do not use )
  203.     fontData    22                    ( -202 )
  204.     playIndex    long                ( -180 )
  205.     fontPtr        QDPtr        \ ^FMOutput record ( -176 )
  206.     fontAdj        SizeOf( Point )        ( -172 )
  207.     patAlign    SizeOf( Point )        ( -168 )
  208.     polyMax        short                ( -164 )
  209.     thePoly        QDHandle            ( -162 )
  210.     QDSpare0    short        \ unused word ( -158 )
  211.     playPic        Long                ( -156, -15A(A5), $-A0(A5) )
  212.     rgnMax        INTEGER                ( -152, -156(A5), $-9C(A5) )
  213.     rgnIndex    INTEGER                ( -150, -154(A5), $-9A(A5) )
  214.     rgnBuf        QDHandle    \ PointsHandle ( -148, -152(A5), $-98(A5) )
  215.     wideData    10            \ Fake Region  ( -144, -148(A5), $-94(A5) )
  216.     wideMaster    RgnPtr                ( -134, -138(A5), $-8A(A5) )
  217.     wideOpen    RgnHandle            ( -130, -134(A5), $-86(A5) )
  218.     ( end of "private" variables )
  219.     randSeed    long                ( -126, -130(A5), $-82(A5) )
  220.     screenBits    SizeOf( BitMap )    ( -122, -126(A5), $-7E(A5) )
  221.     arrow        SizeOf( Cursor )    ( -108, -112(A5), $-70(A5) )
  222.     dkGray        Pattern                (  -40,  -44(A5), $-2C(A5) )
  223.     ltGray        Pattern                (  -32,  -36(A5), $-24(A5) )
  224.     gray        Pattern                (  -24,  -28(A5), $-1C(A5) )
  225.     black        Pattern                (  -16,  -20(A5), $-14(A5) )
  226.     white        Pattern                (   -8,  -12(A5), $-C(A5)  )
  227.     thePort        QDPtr                (    0,   -4(A5) )
  228. ;RECORD
  229.  
  230. (  low-memory globals  )
  231. $102    CONSTANT ScrVRes
  232. $104    CONSTANT ScrHRes
  233. $106    CONSTANT ScreenRow
  234. $156    CONSTANT RndSeed
  235. $824    CONSTANT ScrnBase
  236. $834    CONSTANT CrsrPin
  237.  
  238.     #ifdef _MODULES_
  239.         _QuickDraw_ restore.Name.Space
  240.     #endif
  241.  
  242. #endif
  243. pop.VOCAB.state
  244.  
  245.